<div xmlns:ext="http://www.extjs.com" class="body-wrap"><h1>Class <a href="source/GroupSummary.html#cls-Ext.ux.grid.GroupSummary">Ext.ux.grid.GroupSummary</a></h1><table cellspacing="0"><tr><td class="label">Package:</td><td class="hd-info">Ext.ux.grid</td></tr><tr><td class="label">Defined In:</td><td class="hd-info"><a href="source/GroupSummary.html#cls-Ext.ux.grid.GroupSummary">GroupSummary.js</a></td></tr><tr><td class="label">Class:</td><td class="hd-info"><a href="source/GroupSummary.html#cls-Ext.ux.grid.GroupSummary">GroupSummary</a></td></tr><tr><td class="label">Subclasses:</td><td class="hd-info"><a href="output/Ext.ux.grid.HybridSummary.html" ext:cls="Ext.ux.grid.HybridSummary">HybridSummary</a></td></tr><tr><td class="label">Extends:</td><td class="hd-info">Object</td></tr></table><div class="description">A GridPanel plugin that enables dynamic column calculations and a dynamically
updated grouped summary row.</div><div class="hr"></div><a id="Ext.ux.grid.GroupSummary-configs"></a><h2>Config Options</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Config Options</th><th class="msource-header">Defined By</th></tr><tr class="config-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.ux.grid.GroupSummary-summaryRenderer"></a><b><a href="source/GroupSummary.html#cfg-Ext.ux.grid.GroupSummary-summaryRenderer">summaryRenderer</a></b> : Function<div class="mdesc"><div class="short">Renderer example:summaryRenderer: function(v, params, data){
    return ((v === 0 || v &gt; 1) ? '(' + v +' Tasks)' : '(...</div><div class="long">Renderer example:<pre><code>summaryRenderer: <b>function</b>(v, params, data){
    <b>return</b> ((v === 0 || v > 1) ? <em>'('</em> + v +<em>' Tasks)'</em> : <em>'(1 Task)'</em>);
},</code></pre></div></div></td><td class="msource">GroupSummary</td></tr><tr class="config-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.ux.grid.GroupSummary-summaryRenderer"></a><b><a href="source/ux-all-debug.html#cfg-Ext.ux.grid.GroupSummary-summaryRenderer">summaryRenderer</a></b> : Function<div class="mdesc"><div class="short">Renderer example:summaryRenderer: function(v, params, data){
    return ((v === 0 || v &gt; 1) ? '(' + v +' Tasks)' : '(...</div><div class="long">Renderer example:<pre><code>summaryRenderer: <b>function</b>(v, params, data){
    <b>return</b> ((v === 0 || v > 1) ? <em>'('</em> + v +<em>' Tasks)'</em> : <em>'(1 Task)'</em>);
},</code></pre></div></div></td><td class="msource">GroupSummary</td></tr><tr class="config-row  "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.ux.grid.GroupSummary-summaryType"></a><b><a href="source/GroupSummary.html#cfg-Ext.ux.grid.GroupSummary-summaryType">summaryType</a></b> : String<div class="mdesc">The type of
calculation to be used for the column.  For options available see
<a href="output/Ext.ux.grid.GroupSummary.html#Ext.ux.grid.GroupSummary-Calculations" ext:member="Calculations" ext:cls="Ext.ux.grid.GroupSummary">Calculations</a>.</div></td><td class="msource">GroupSummary</td></tr><tr class="config-row  "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.ux.grid.GroupSummary-summaryType"></a><b><a href="source/ux-all-debug.html#cfg-Ext.ux.grid.GroupSummary-summaryType">summaryType</a></b> : String<div class="mdesc">The type of
calculation to be used for the column.  For options available see
<a href="output/Ext.ux.grid.GroupSummary.html#Ext.ux.grid.GroupSummary-Calculations" ext:member="Calculations" ext:cls="Ext.ux.grid.GroupSummary">Calculations</a>.</div></td><td class="msource">GroupSummary</td></tr></tbody></table><a id="Ext.ux.grid.GroupSummary-props"></a><h2>Public Properties</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Property</th><th class="msource-header">Defined By</th></tr><tr class="property-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.ux.grid.GroupSummary-Calculations"></a><b><a href="source/GroupSummary.html#prop-Ext.ux.grid.GroupSummary-Calculations">Calculations</a></b> : Object<div class="mdesc"><div class="short">Calculation types for summary row:&lt;div class="mdetail-params"&gt;
sum : &lt;div class="sub-desc"&gt;
count : &lt;div class="sub-d...</div><div class="long">Calculation types for summary row:</p><div class="mdetail-params"><ul>
<li><b><tt>sum</tt></b> : <div class="sub-desc"></div></li>
<li><b><tt>count</tt></b> : <div class="sub-desc"></div></li>
<li><b><tt>max</tt></b> : <div class="sub-desc"></div></li>
<li><b><tt>min</tt></b> : <div class="sub-desc"></div></li>
<li><b><tt>average</tt></b> : <div class="sub-desc"></div></li>
</ul></div>
<p>Custom calculations may be implemented.  An example of
custom <code>summaryType=totalCost</code>:</p><pre><code><i>// define a custom summary <b>function</b></i>
Ext.ux.grid.GroupSummary.Calculations[<em>'totalCost'</em>] = <b>function</b>(v, record, field){
    <b>return</b> v + (record.data.estimate * record.data.rate);
};</code></pre></div></div></td><td class="msource">GroupSummary</td></tr><tr class="property-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.ux.grid.GroupSummary-Calculations"></a><b><a href="source/ux-all-debug.html#prop-Ext.ux.grid.GroupSummary-Calculations">Calculations</a></b> : Object<div class="mdesc"><div class="short">Calculation types for summary row:&lt;div class="mdetail-params"&gt;
sum : &lt;div class="sub-desc"&gt;
count : &lt;div class="sub-d...</div><div class="long">Calculation types for summary row:</p><div class="mdetail-params"><ul>
<li><b><tt>sum</tt></b> : <div class="sub-desc"></div></li>
<li><b><tt>count</tt></b> : <div class="sub-desc"></div></li>
<li><b><tt>max</tt></b> : <div class="sub-desc"></div></li>
<li><b><tt>min</tt></b> : <div class="sub-desc"></div></li>
<li><b><tt>average</tt></b> : <div class="sub-desc"></div></li>
</ul></div>
<p>Custom calculations may be implemented.  An example of
custom <code>summaryType=totalCost</code>:</p><pre><code><i>// define a custom summary <b>function</b></i>
Ext.ux.grid.GroupSummary.Calculations[<em>'totalCost'</em>] = <b>function</b>(v, record, field){
    <b>return</b> v + (record.data.estimate * record.data.rate);
};</code></pre></div></div></td><td class="msource">GroupSummary</td></tr></tbody></table><a id="Ext.ux.grid.GroupSummary-methods"></a><h2>Public Methods</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Method</th><th class="msource-header">Defined By</th></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.ux.grid.GroupSummary-showSummaryMsg"></a><b class="method"><a href="source/ux-all-debug.html#method-Ext.ux.grid.GroupSummary-showSummaryMsg">showSummaryMsg</a></b><span class="openparen">(&nbsp;</span><span title="Required" class="required">String&nbsp;groupValue</span><span class="comma">,&nbsp;</span><span title="Required" class="required">String&nbsp;msg</span><span class="closeparen">&nbsp;)</span><span class="colon">&nbsp;:&nbsp;</span><span class="return">void</span><div class="mdesc"><div class="short">Show a message in the summary row.
grid.on('afteredit', function(){
    var groupValue = 'Ext Forms: Field Anchoring'...</div><div class="long">Show a message in the summary row.
<pre><code>grid.on(<em>'afteredit'</em>, <b>function</b>(){
    <b>var</b> groupValue = <em>'Ext Forms: Field Anchoring'</em>;
    summary.showSummaryMsg(groupValue, <em>'Updating Summary...'</em>);
});</code></pre><div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>groupValue</code> : String<div class="sub-desc"></div></li><li><code>msg</code> : String<div class="sub-desc">Text to use as innerHTML for the summary row.</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource">GroupSummary</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.ux.grid.GroupSummary-toggleSummaries"></a><b class="method"><a href="source/ux-all-debug.html#method-Ext.ux.grid.GroupSummary-toggleSummaries">toggleSummaries</a></b><span class="openparen">(&nbsp;</span><span title="Required" class="required">Boolean&nbsp;visible</span><span class="closeparen">&nbsp;)</span><span class="colon">&nbsp;:&nbsp;</span><span class="return">void</span><div class="mdesc"><div class="short">Toggle the display of the summary row on/off</div><div class="long">Toggle the display of the summary row on/off<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>visible</code> : Boolean<div class="sub-desc"><tt>true</tt> to show the summary, <tt>false</tt> to hide the summary.</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource">GroupSummary</td></tr></tbody></table><a id="Ext.ux.grid.GroupSummary-events"></a><h2>Public Events</h2><div class="no-members">This class has no public events.</div></div>